﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Meeting.Public;

namespace Meeting.Web.Admin.Summary
{
    public partial class SummaryDetail : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack) return;
            ViewState["index"] = 1;
            SetUrl();
        }
        private void SetUrl()
        {
            string url = "../../upload/summary/";
            url += CommonFunction.getRequestValue("Path") + "/";//日期
            url += CommonFunction.getRequestValue("mId") + "/";//会议id
            url += CommonFunction.getRequestValue("Id") + "/";//纪要id
            url += ViewState["index"] + ".jpeg";

            Image1.ImageUrl = url;
        }
        protected void lk_Next_Click(object sender, EventArgs e)
        {

            int nCount = CommonFunction.varToIntDef(CommonFunction.getRequestValue("Count"), 1);
            int currentIndex = CommonFunction.varToIntDef(ViewState["index"], 1);
            if (currentIndex >= nCount) return;
            ViewState["index"] = currentIndex + 1;
            SetUrl();
        }

        protected void lk_Last_Click(object sender, EventArgs e)
        { 
            int currentIndex = CommonFunction.varToIntDef(ViewState["index"], 1);
            if (currentIndex == 1) return;
            ViewState["index"] = currentIndex - 1;
            SetUrl();
        }
    }
}